Skip to content

Fix/wikidata to wiktionary#557

Open
Mounil2005 wants to merge 5 commits intoscribe-org:mainfrom
Mounil2005:fix/wikidata-to-wiktionary
Open

Fix/wikidata to wiktionary#557
Mounil2005 wants to merge 5 commits intoscribe-org:mainfrom
Mounil2005:fix/wikidata-to-wiktionary

Conversation

@Mounil2005
Copy link

Contributor checklist


Description

This pull request prepares Scribe-Android for the migration from Wikidata to Wiktionary as the data source for translations. All string references have been updated from not_in_wikidata to not_in_wiktionary.

Main changes:

  • Updated string key names across 17 language-specific string.xml files (Arabic, Bengali, German, Spanish, French, Hindi, Indonesian, Kannada, Korean, Marathi, Portuguese, Swedish, Tamil, Telugu, Turkish, and English)
  • Updated KeyboardUIManager.kt to reference the new Wiktionary string keys
  • Total of 54 string references updated (3 explanation strings × 18 files)

The string content itself remains unchanged as it will be updated separately. These changes ensure the app infrastructure is ready to display Wiktionary-related messages when the backend switches to that data source.

Related issue

Mounil2005 and others added 4 commits March 8, 2026 03:27
Signed-off-by: Mounil <mounilkankhara@gmail.com>
Prepare for transition to using Wiktionary for translations by replacing
all "not_in_wikidata" string keys with "not_in_wiktionary" across all
language interface files and UI components.

Changes apply to:
- 17 language-specific string.xml files
- KeyboardUIManager.kt UI component

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Mounil <mounilkankhara@gmail.com>
Signed-off-by: Mounil <mounilkankhara@gmail.com>
@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Thank you for the pull request! 💙

The Scribe-Android team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and Android rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the unit test, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

    • Tests may need to be reran as they're at times not deterministic
  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First PR Commit Check

  • The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution
    - The contributor's name and icon in remote commits should be the same as what appears in the PR
    - If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local Scribe-Android repo (can be set with git config --global user.email "GITHUB_EMAIL")

@Mounil2005
Copy link
Author

Hey, @andrewtavis pls review and let me know in case of any changes!

@andrewtavis
Copy link
Member

andrewtavis commented Mar 8, 2026

Thanks for the PR here, @Mounil2005 :) We have a couple of instructions here based on a discussion we had in our most recent dev sync:

  • Firstly, we need both the Not in Wikidata and Not in Wiktionary texts
  • We also made the decision that we want these texts to no longer be in Scribe-i18n
    • This is where those XML texts are from
    • Reason for this is that these XML texts are presented to the user based on the device language, but we want these to be based on the keyboard language
    • You don't need to edit those files in Scribe-i18n, I'll remove them

Could you do the following:

  • Set up variables for all of these texts in the interface variable files
    • const val INVALID_COMMAND_MSG_WIKIDATA = "Not in Wikidata"
    • const val INVALID_COMMAND_TEXT_WIKIDATA_1 = "FIRST_TEXT_ABOUT_WIKIDATA"
    • const val INVALID_COMMAND_TEXT_WIKIDATA_2 = "SECOND_TEXT_ABOUT_WIKIDATA"
    • const val INVALID_COMMAND_TEXT_WIKIDATA_3 = "THIRD_TEXT_ABOUT_WIKIDATA"
    • const val INVALID_COMMAND_MSG_WIKTIONARY = "Not in Wiktionary"
    • const val INVALID_COMMAND_TEXT_WIKTIONARY_1 = "FIRST_TEXT_ABOUT_WIKTIONARY"
    • const val INVALID_COMMAND_TEXT_WIKTIONARY_2 = "SECOND_TEXT_ABOUT_WIKTIONARY"
    • const val INVALID_COMMAND_TEXT_WIKTIONARY_3 = "THIRD_TEXT_ABOUT_WIKTIONARY"
  • If we don't have a interface variables file for a language that we have in Scribe-i18n, feel free to make it and just add these variables for now
  • We want the Wikidata version of this message to be shown to the user for conjugate and plural, and the Wiktionary version to be shown for the translate command
  • Make sure that these texts are being displayed to the user in the language of the keyboard, not the device language

CC @catreedle and @angrezichatterbox 👋 Hope the above makes sense to you two :)

@Mounil2005
Copy link
Author

Got it, working on it!

Signed-off-by: Mounil <mounilkankhara@gmail.com>
@Mounil2005
Copy link
Author

Hey @andrewtavis, I have implemented the changes, pls let me know in case of any changes!!

@Mounil2005
Copy link
Author

Hi @andrewtavis, just a gentle reminder about this PR. Happy to adjust anything needed, thanks!

@angrezichatterbox
Copy link
Member

Hi @andrewtavis, just a gentle reminder about this PR. Happy to adjust anything needed, thanks!

Hey
Sorry for the delay. We would get to review it today :)

@andrewtavis
Copy link
Member

Thanks for the reminder @Mounil2005 and thanks for the review request, @angrezichatterbox :) @angrezichatterbox, let me know if you have a moment to sit for a review of this later this week. I'll do a quick review now and maybe you can do the changes in the coming days, @Mounil2005?

const val SPACE_BAR = "space"
const val LANGUAGE = "English"
const val INVALID_COMMAND_MSG = "Not in Wikidata"
const val INVALID_COMMAND_MSG = "Not in Wiktionary"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need INVALID_COMMAND_MSG and INVALID_COMMAND_MSG_WIKTIONARY, so feel free to remove INVALID_COMMAND_MSG. Ideally these variables would be ordered as you have them with the Wikidata ones first.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do this removal of INVALID_COMMAND_MSG for all files :)

const val INVALID_COMMAND_MSG = "Pas dans Wikidata"
const val INVALID_COMMAND_MSG = "Pas dans Wiktionary"
const val INVALID_COMMAND_MSG_WIKIDATA = "Pas dans Wikidata"
const val INVALID_COMMAND_TEXT_WIKIDATA_1 =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we'd move over the texts that we already have for Wikidata in the various languages. As of now we have the English text for all of the Wikidata ones. Could you check the Scribe-i18n project for what these texts should be in the respective languages?

<string name="i18n.app.keyboard.not_in_wikidata.explanation_1">Wikidata هي قاعدة بيانات معرفية يتم تحريرها بشكل تعاوني ويتم إدارتها من قبل مؤسسة ويكيميديا. تعمل كمصدر للبيانات المفتوحة لمشاريع مثل ويكيبيديا والعديد من المشاريع الأخرى.</string>
<string name="i18n.app.keyboard.not_in_wikidata.explanation_2">يستخدم Scribe بيانات اللغة من Wikidata للعديد من ميزاته الأساسية. نحصل على معلومات مثل أجناس الأسماء، وتصريف الأفعال والمزيد!</string>
<string name="i18n.app.keyboard.not_in_wikidata.explanation_3">يمكنك إنشاء حساب في wikidata.org للانضمام إلى المجتمع الذي يدعم Scribe والعديد من المشاريع الأخرى. ساعدنا في تقديم المعلومات المجانية للعالم!</string>
<string name="i18n.app.keyboard.not_in_wiktionary.explanation_1">ويكاموس هو قاموس تعاوني يتم تحريره بشكل جماعي ويتم إدارته من قبل مؤسسة ويكيميديا. يوفر تعريفات الكلمات ومعانيها بعدة لغات. </string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert all changes to the string.xml files? I'll remove these strings in Scribe-i18n and bring the new changes back in.

@andrewtavis
Copy link
Member

Re the above comment, if you'd like to do a PR to Scribe-i18n as well to support with this, you could send along a PR that removes i18n.app.keyboard.not_in_wikidata.explanation_1, i18n.app.keyboard.not_in_wikidata.explanation_2 and i18n.app.keyboard.not_in_wikidata.explanation_3 from all of the JSON files :) Feel free to open this and we'll bring that in and then merge the changes there into this PR!

@andrewtavis
Copy link
Member

And one final thing for now - we have the i18n.app.keyboard.not_in_wikidata.explanation_* texts for a lot of languages in Scribe-i18n:

Screenshot 2026-03-16 at 22 58 29

Could you add an InterfaceVariables.kt variable for each of the languages that we currently don't have a file for and then define these three Wikidata string variables? No other changes are needed for these files. The purpose is that we save the strings that we've gotten from the localization community 😊

@andrewtavis
Copy link
Member

Please let us know if you have any questions! Thanks for your efforts so far 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants